Note that StartMovie will preroll the movie; also, the standard controller prerolls the movie whenever the user starts a movie using the keyboard or the mouse. In these situations, a possible second PrerollMovie call is redundant and will waste time and resources.
In all other cases, you should preroll the movie. For instance, it is your responsibility to call PrerollMovie if you are using SetMovieRate, or if you use McDoAction with mcActionPlay and a rate. Here's an example of how to use PrerollMovie:
OSErr DoPrerollMovie(Movie theMovie) { TimeValue aTimeValue; TimeValue aMovieDur; Fixed aPreferredRate; OSErr anErr = noErr; aTimeValue = GetMovieTime(theMovie, nil); aMovieDur = GetMovieDuration(theMovie); aPreferredRate = GetMoviePreferredRate(theMovie); anErr = PrerollMovie(theMovie, aTimeValue, aPreferredRate); return anErr; }
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help